package com.bjsxt.feign;

import com.bjsxt.config.feign.OAuth2FeignConfig;
import com.bjsxt.dto.UserBankFeignDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * description:
 * OpenFeign 远程调用 member-service 的 http 接口
 *
 * @author ALIENWARE
 * @version v1.0.0
 * @create 5/2/2024
 **/
@FeignClient(name = "member-server", contextId = "userBankFeignClient", configuration = OAuth2FeignConfig.class, path = "/userBanks")
public interface UserBankFeignClient {
    /**
     * 获取用户银行卡数据
     *
     * @param userId 用户 id
     * @return 用户银行卡
     */
    @GetMapping("/getUserBank")
    UserBankFeignDto getUserBank(@RequestParam(value = "userId") Long userId);
}
